﻿using Microsoft.EntityFrameworkCore;
using PoemGame.Management.Domain;

namespace PoemGame.Management.Repository
{
    public class ManagementDbContext:DbContext
    {
        public DbSet<Player> Players { get; set; }

        public DbSet<Game> Games { get; set; }
        public ManagementDbContext(DbContextOptions<ManagementDbContext> options) : base(options)
        {

        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfiguration(new PlayerEntityTypeConfiguration());
            modelBuilder.ApplyConfiguration(new GameEntityTypeConfiguration());
        }
    }
}
